﻿<%@ Page Language="C#" MasterPageFile="~/member/mMenber.master" AutoEventWireup="true" CodeBehind="newactivity.aspx.cs" UICulture="auto" 
Inherits="map.member.lvyou.newactivity" Title="发起活动" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head2" runat="server">
    <link href="/outstyle.css" rel="stylesheet" type="text/css" />
    <link href="/Stylesheet1.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style6
        {
            width: 100%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">
<%--    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>--%>
    <asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="True" 
        onselectedindexchanged="RadioButtonList1_SelectedIndexChanged" 
        RepeatDirection="Horizontal">
        <asp:ListItem>报名中</asp:ListItem>
        <asp:ListItem>执行中</asp:ListItem>
        <asp:ListItem>已完成</asp:ListItem>
        <asp:ListItem>全部</asp:ListItem>
    </asp:RadioButtonList>
<div style =" width:100%;">
               <%-- <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>--%>
    <asp:GridView ID="GridView1" runat="server" BackColor="White"  Width="100%" DataKeyNames="RECID"
        BorderColor="#336666" BorderStyle="Double" BorderWidth="3px" CellPadding="4" 
        GridLines="Horizontal" onselectedindexchanged="GridView1_SelectedIndexChanged" 
                   onselectedindexchanging="GridView1_SelectedIndexChanging">
        <Columns>
         <asp:BoundField DataField="RECID" HeaderText="RECID" SortExpression="RECID" Visible="false" />    
            <asp:BoundField DataField="jcvaliddate" HeaderText="报名开始日期" 
                SortExpression="cbtitle" />         
            <asp:BoundField DataField="jcvalidtime" HeaderText="报名结束日期" 
                SortExpression="qiangdu" />
            <asp:BoundField DataField="jcstartdate" HeaderText="活动开始日期" 
                SortExpression="leixing" />          
            <asp:BoundField DataField="jcpoint" HeaderText="景点" 
                SortExpression="renshu" />
         
          
                 <asp:CommandField ShowSelectButton="True" />
                <%-- <asp:CommandField ShowDeleteButton="true" />--%>
        </Columns>
        <FooterStyle BackColor="White" ForeColor="#333333" />
        <RowStyle BackColor="White" ForeColor="#333333" />
        <PagerStyle BackColor="#336666" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#339966" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#336666" Font-Bold="True" ForeColor="White" />
    </asp:GridView>
    <table class="style6">
        <tr>
            <td style ="width:150px;">
                当前ID：</td>
            <td>
                <asp:Label ID="Label_recid" runat="server" Text=""></asp:Label>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td style="width:150px;">
                报名开始日期：</td>
            <td>
                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><asp:ImageButton runat="server" ID="Image1" ImageUrl="../../img/Calendar.png" />
                    <cc1:CalendarExtender ID="CalendarExtender1" runat="server" PopupButtonID="Image1" Format="yyyy MMMM d" TargetControlID="TextBox1" EnabledOnClient="True">
</cc1:CalendarExtender>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                报名截止时间：</td>
            <td><asp:TextBox ID="TextBox9" runat="server"></asp:TextBox><asp:ImageButton runat="server" ID="ImageButton1" ImageUrl="../../img/Calendar.png" />
                    <cc1:CalendarExtender ID="CalendarExtender2" runat="server" PopupButtonID="ImageButton1" Format="yyyy MMMM d" TargetControlID="TextBox9" EnabledOnClient="True">
</cc1:CalendarExtender>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                活动开始日期：</td>
            <td>
                <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox><asp:ImageButton runat="server" ID="ImageButton2" ImageUrl="../../img/Calendar.png" />
                    <cc1:CalendarExtender ID="CalendarExtender3" runat="server" PopupButtonID="ImageButton2" Format="yyyy MMMM d" TargetControlID="TextBox3" EnabledOnClient="True">
</cc1:CalendarExtender>
            </td>
            <td>
                </td>
        </tr>
        <tr>
            <td>
                选择景点：</td>
            <td>
                <asp:DropDownList ID="DropDownList1" runat="server">
                </asp:DropDownList>
            
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                <asp:Button ID="Button1" runat="server" Text="增加" onclick="Button1_Click" />
                &nbsp;<asp:Button ID="Button2" runat="server" Text="修改" 
                    onclick="Button2_Click" />
            </td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
<br />
</div>
<%--</ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
    <ContentTemplate>--%>
        <asp:GridView ID="GridView2" runat="server" BackColor="White" 
            BorderColor="#336666" BorderStyle="Double" BorderWidth="3px" CellPadding="4" 
            DataKeyNames="RECID" GridLines="Horizontal" Width="100%" 
        onselectedindexchanging="GridView2_SelectedIndexChanging">
            <Columns>
         <asp:BoundField DataField="RECID" HeaderText="RECID" SortExpression="RECID" Visible="false" />    
            <asp:BoundField DataField="cbtitle" HeaderText="标题" 
                SortExpression="cbtitle" />         
            <asp:BoundField DataField="qiangdu" HeaderText="强度" 
                SortExpression="qiangdu" />
            <asp:BoundField DataField="leixing" HeaderText="类型" 
                SortExpression="leixing" />          
            <asp:BoundField DataField="renshu" HeaderText="人数" 
                SortExpression="renshu" />
            <asp:BoundField DataField="cbstatus" HeaderText="状态" 
                SortExpression="cbstatus" />
          
                 <asp:CommandField ShowSelectButton="True" />
                <%-- <asp:CommandField ShowDeleteButton="true" />--%>
        </Columns>
            <FooterStyle BackColor="White" ForeColor="#333333" />
            <RowStyle BackColor="White" ForeColor="#333333" />
            <PagerStyle BackColor="#336666" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#339966" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#336666" Font-Bold="True" ForeColor="White" />
        </asp:GridView>
        <table  style ="width:100%;">
            <tr>
                <td style ="width:20%;">
                    标题：</td>
                <td style ="width:30%;">
                    <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
                </td>
                <td style ="width:20%;">
                    人数：</td>
                <td style ="width:30%;">
                    <asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="RegularExpressionValidator" ValidationExpression='"^[0-9]*$"' Text="有误" ControlToValidate="TextBox5"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td>
                    适合人群：</td>
                <td>
                    <asp:DropDownList ID="DropDownList5" runat="server">
                    </asp:DropDownList>
                </td>
                <td>
                    景点1：</td>
                <td>
                    <asp:DropDownList ID="DropDownList10" runat="server">
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownList11" runat="server">
                    </asp:DropDownList>
                    <br />
                    <asp:DropDownList ID="DropDownList12" runat="server">
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownList13" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    时间长度：</td>
                <td>
                    <asp:DropDownList ID="DropDownList6" runat="server">
                    </asp:DropDownList>
                </td>
                <td>
                    景点2：</td>
                <td>
                    <asp:DropDownList ID="DropDownList14" runat="server">
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownList15" runat="server">
                    </asp:DropDownList>
                    <br />
                    <asp:DropDownList ID="DropDownList16" runat="server">
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownList17" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    体力强度：</td>
                <td>
                    <asp:DropDownList ID="DropDownList7" runat="server">
                    </asp:DropDownList>
                </td>
                <td>
                    景点3：</td>
                <td>
                    <asp:DropDownList ID="DropDownList18" runat="server">
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownList19" runat="server">
                    </asp:DropDownList>
                    <br />
                    <asp:DropDownList ID="DropDownList20" runat="server">
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownList21" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    活动类型：</td>
                <td>
                    <asp:DropDownList ID="DropDownList8" runat="server">
                    </asp:DropDownList>
                </td>
                <td>
                    景点4：</td>
                <td>
                    <asp:DropDownList ID="DropDownList22" runat="server">
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownList23" runat="server">
                    </asp:DropDownList>
                    <br />
                    <asp:DropDownList ID="DropDownList24" runat="server">
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownList25" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    性别比例：</td>
                <td>
                    <asp:DropDownList ID="DropDownList9" runat="server">
                    </asp:DropDownList>
                </td>
                <td>
                    景点5：</td>
                <td>
                    <asp:DropDownList ID="DropDownList26" runat="server">
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownList27" runat="server">
                    </asp:DropDownList>
                    <br />
                    <asp:DropDownList ID="DropDownList28" runat="server">
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownList29" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    人均消费：</td>
                <td>
                    <asp:TextBox ID="TextBox6" runat="server"></asp:TextBox>
                     <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="RegularExpressionValidator" ValidationExpression='"^[0-9]*$"' Text="有误" ControlToValidate="TextBox6"></asp:RegularExpressionValidator>
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    <asp:Label ID="MainRecId" runat="server" Text="RECID" Visible="false"></asp:Label><br />&nbsp;</td>
            </tr>
            <tr>
                <td>
                    集合地点：</td>
                <td>
                    </td>
                <td>
                    行程信息：</td>
                <td>
                    </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:DropDownList ID="DropDownList30" runat="server">
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownList31" runat="server">
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownList32" runat="server">
                    </asp:DropDownList>
                    <br />
                    经度：<asp:TextBox ID="TextBox7" runat="server" Enabled="False"></asp:TextBox>
                    纬度：<asp:TextBox ID="TextBox8" runat="server" Enabled="False"></asp:TextBox>
                    <br /><script src="http://ditu.google.cn/maps?file=api&amp;v=2&amp;key=ABQIAAAAA9MjP2TBxqYxBhVpW-OpKRRu9WK7kBr6UgG1CsdYn6QIvNE0PRSz6nmGnZgAI_mC8x2qRC7L3jK29Q"
            type="text/javascript">
            </script> 

                    <script src="../../js/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        var map;
        
//        var geocoder = null;
//        function showAddress(address) {
//            if (geocoder) {
//                geocoder.getLatLng(
//          address,
//          function(point) {
//              if (!point) {
//                  alert("不能解析: " + address);
//              } else {
//                  map.setCenter(point, 13);
//                  var marker = new GMarker(point);
//                  map.addOverlay(marker);
//                  marker.openInfoWindowHtml(address);
//              }
//          }
//        );
//            }
//        }
        function markpos2(zlong, zlat, desc) {
            map.clearOverlays();
            var point1 = new GLatLng(zlat, zlong);
            var marker1 = new GMarker(point1);
            GEvent.addListener(marker1, "click", function() {
                marker1.openInfoWindowHtml("标注此位置");
            });
            map.addOverlay(marker1);
            map.setCenter(point1, 14);
        }
        jQuery(function($) {
//           

                           if (GBrowserIsCompatible()) {
                                map = new GMap2(document.getElementById("map_canvas"));


                               map.setMapType(G_NORMAL_MAP);
                                map.addControl(new GMapTypeControl());
                              map.addControl(new GLargeMapControl());
                                       map.enableContinuousZoom();
                              
                                map.enableGoogleBar();
                                G_NORMAL_MAP.getMinimumResolution = function() {
                                    return 10
                                };
                                G_NORMAL_MAP.getMaximumResolution = function() {
                                    return 19
                                };
                                var center = new GLatLng(39.91, 116.39);
                                map.setCenter(center, 14);



                               GEvent.addListener(map, "click", function(overlay, latlng) {
                                if (latlng) {
                                  var myHtml = "标注此位置";
                                  
                                  map.clearOverlays();

                                    map.openInfoWindow(latlng, myHtml);
                                       var lat = latlng.lat();
                                      var lon = latlng.lng();
                                     
                                      document.getElementById("ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder3_TextBox8").value = lat;
                                        document.getElementById("ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder3_TextBox7").value = lon;
                                        var point = new GLatLng(lat, lon);
                                       var marker = new GMarker(point);
                                       GEvent.addListener(marker, "click", function() {
                                            marker.openInfoWindowHtml("标注此位置");
                                        });
                                        map.addOverlay(marker);
                                   }
                               });
//                              
                            
                            
            } 
        });
    </script> 
                    <div style="width:100%; height:240px;" id="map_canvas"></div>
                </td>
                <td colspan="2">
                    <FCKeditorV2:FCKeditor ID="Fck_gonggao" runat="server" Height="280px" Width="100%">
                </FCKeditorV2:FCKeditor></td>
            </tr>
            <tr>
                <td>
                    费用说明：</td>
                <td>
                    &nbsp;</td>
                <td>
                    出行须知：</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="2">
                    <FCKeditorV2:FCKeditor ID="Fck_gonggao0" runat="server" Height="280px" 
                        Width="100%">
                </FCKeditorV2:FCKeditor></td>
                <td colspan="2">
                    <FCKeditorV2:FCKeditor ID="Fck_gonggao1" runat="server" Height="280px" 
                        Width="100%">
                </FCKeditorV2:FCKeditor></td>
            </tr>
            <tr>
                <td>
                    景点介绍：</td>
                <td>
                    &nbsp;</td>
                <td>
                    其他说明：</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="2">
                    <FCKeditorV2:FCKeditor ID="Fck_gonggao2" runat="server" Height="280px" 
                        Width="100%">
                </FCKeditorV2:FCKeditor></td>
                <td colspan="2">
                    <FCKeditorV2:FCKeditor ID="Fck_gonggao3" runat="server" Height="280px" 
                        Width="100%">
                </FCKeditorV2:FCKeditor></td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    <asp:Button ID="Button3" runat="server" Text="增加" onclick="Button3_Click" />
                    &nbsp;<asp:Button ID="Button4" runat="server" Text="修改" 
                        onclick="Button4_Click" />
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
        <br />
<%--    </ContentTemplate>
    </asp:UpdatePanel>--%>
    
    
    
</asp:Content>
